$(function () {
    window.addEventListener('load', function() {
        new FastClick(document.body);
    }, false);
    $(".address-list-panel").on('click',function () {
        var that = $(this),
            uaId = that.attr('data-id');
        if(window.location.href.getQueryJson().type=='updata'){
            window.location.href="/add-address?id="+uaId;
        }else {
            $.each(ADDRESS, function (i, item) {
                if (item.ua_id==uaId) {
                    CommonJs.address.set(item);
                    return false;
                }
            });
        }
    });
});
function  back() {
    if(window.location.href.getQueryJson().type=='updata'){
        window.history.go(-1);
    }else {
        CommonJs.address.close();
    }
}